// ==UserScript== 
// @name ajuribe1
// @namespace http://geneura.org/projects/greasemonkey 
// @description Navegación por las secciones de AAP 
// @include http://geneura.ugr.es/~jmerelo/asignaturas/* 
// ==/UserScript== 

GM_log('Entrando ajuribe'); 
var h3 = document.getElementsByTagName('h3'); 




for ( var secs = 0; secs < h3.length; secs ++ ) 
{ 
	var span = document.createElement('span'); 
	span.setAttribute('style','background:lightblue'); 
	if ( secs > 0 ) 
	{ 
		var ahref = document.createElement('a'); 
		ahref.setAttribute('href','#ej.T1.'+secs); 
		var txt=document.createTextNode('^'); 
		ahref.appendChild(txt); 
		span.appendChild(ahref); 
	} 
	if ( secs < h3.length -1 )
	{ 
		span.appendChild(document.createTextNode(' | '));
		var ahref = document.createElement('a');
		ahref.setAttribute('href','#ej.T1.'+(secs+2));
		var txt=document.createTextNode('v'); 
		ahref.appendChild(txt); 
		span.appendChild(ahref); 
	}
	h3[secs].parentNode.insertBefore(span,h3[secs]); 
} 
